package Metier.Objets;

import java.util.Arrays;
import java.util.Objects;

public class Utilisateur {

    private Role role;
    
    private char[] pass;
    
    public Utilisateur(Role role, char[] pass) {
        this.role = role;
        this.pass = pass;
    }

    public Role getRole() {
        return role;
    }

    public Utilisateur setRole(Role role) {
        this.role = role;
        return this;
    }

    public char[] getPass() {
        return pass;
    }

    public Utilisateur setPass(char[] pass) {
        this.pass = pass;
        return this;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 61 * hash + Objects.hashCode(this.role);
        hash = 61 * hash + Objects.hashCode(this.pass);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        final Utilisateur other = (Utilisateur) obj;
        return !(obj == null || 
                getClass() != obj.getClass() ||
                !Objects.equals(this.role, other.role) ||
                !Arrays.equals(this.pass, other.pass));
    }

}